<script>
import axios from "axios";
export default {
    name: "Home",
    data(){
        return {
            items:[]
        }
    },
    mounted(){
        // https://api.github.com/search/users?q=react
        axios.get("https://api.github.com/search/users?q=vue").then(value=>{
            this.items = value.data.items;
        })
    }
}
</script>

<template>
    <div>
        <p v-for="item in items" :key="item.id">
            <router-link :to="'/detail/'+item.login+'.html'">{{item.login}}</router-link>
        </p>
    </div>
</template>

<style scoped>

</style>